package com.meng.a_controller;

import com.meng.redis.JedisUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import redis.clients.jedis.JedisCluster;


/**
 * 测试类
 *
 * @author MENG
 * @version 2017/12/7
 * @see
 */
@Controller
@RequestMapping("test")
public class TestController
{

    @Autowired
    private JedisCluster jedisCuster;

    @RequestMapping("testJedis")
    public String testJedis()
    {
        jedisCuster.set("MENG","jianjunmeng");

        System.out.println(jedisCuster.get("MENG"));

        System.out.println(JedisUtils.JedisClusterKeys(jedisCuster,"*").size());

        return "index";
    }


}
